<!DOCTYPE html>
<html>
  <head>
  <meta charset='UTF-8'>
  <title>Atom-Beautify Documentation</title>
  <script src='../javascript/application.js'></script>
  <script src='../javascript/search.js'></script>
  <link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
</head>
  <body>
    <div id='base' data-path='../'></div>
<div id='header'>
  <div id='menu'>
    <a href='../extra/README.md.html' title='Atom-Beautify'>
      Atom-Beautify
    </a>
    &raquo;
    <a href='../alphabetical_index.html' title='Index'>
      Index
    </a>
    &raquo;
    <span class='title'>Beautifiers</span>
  </div>
</div>
    <div id='content'>
      <h1>
        Class:
        Beautifiers
      </h1>
      <table class='box'>
        <tr>
          <td>Defined in:</td>
          <td>src&#47;beautifiers&#47;index.coffee</td>
        </tr>
        <tr>
          <td>Inherits:</td>
          <td>
            EventEmitter
          </td>
        </tr>
      </table>
      <h2>Variables Summary</h2>
      <dl class='constants'>
  <dt id='beautifierNames-variable'>
    beautifierNames
    =
  </dt>
  <dd>
    <pre><code class='coffeescript'>[&#39;uncrustify&#39;, &#39;align-yaml&#39;, &#39;autopep8&#39;, &#39;brittany&#39;, &#39;coffee-formatter&#39;, &#39;coffee-fmt&#39;, &#39;cljfmt&#39;, &#39;clang-format&#39;, &#39;crystal&#39;, &#39;dfmt&#39;, &#39;elm-format&#39;, &#39;hh_format&#39;, &#39;htmlbeautifier&#39;, &#39;csscomb&#39;, &#39;gherkin&#39;, &#39;gn&#39;, &#39;gofmt&#39;, &#39;goimports&#39;, &#39;latex-beautify&#39;, &#39;fortran-beautifier&#39;, &#39;hindent&#39;, &#39;vhdl-beautifier&#39;, &#39;js-beautify&#39;, &#39;jscs&#39;, &#39;eslint&#39;, &#39;lua-beautifier&#39;, &#39;nginx-beautify&#39;, &#39;ocp-indent&#39;, &#39;perltidy&#39;, &#39;php-cs-fixer&#39;, &#39;phpcbf&#39;, &#39;prettier&#39;, &#39;prettydiff&#39;, &#39;pybeautifier&#39;, &#39;pug-beautify&#39;, &#39;puppet-fix&#39;, &#39;remark&#39;, &#39;rubocop&#39;, &#39;ruby-beautify&#39;, &#39;rustfmt&#39;, &#39;sass-convert&#39;, &#39;sqlformat&#39;, &#39;stylish-haskell&#39;, &#39;tidy-markdown&#39;, &#39;typescript-formatter&#39;, &#39;vue-beautifier&#39;, &#39;yapf&#39;, &#39;erl_tidy&#39;, &#39;marko-beautifier&#39;, &#39;formatR&#39;, &#39;beautysh&#39;, &#39;terraformfmt&#39;, &#39;verilog-mode&#39;]</code></pre>
    <div class='docstring'>
  <p>List of beautifier names</p><p>To register a beautifier add its name here</p>
</div>
<div class='tags'>
</div>
  </dd>
  <dt id='beautifiers-variable'>
    beautifiers
    =
  </dt>
  <dd>
    <pre><code class='coffeescript'>null</code></pre>
    <div class='docstring'>
  <p>List of loaded beautifiers</p><p>Autogenerated in <code>constructor</code> from <code>beautifierNames</code></p>
</div>
<div class='tags'>
</div>
  </dd>
  <dt id='options-variable'>
    options
    =
  </dt>
  <dd>
    <pre><code class='coffeescript'>null</code></pre>
    <div class='docstring'>
  <p>All beautifier options</p><p>Autogenerated in <code>constructor</code></p>
</div>
<div class='tags'>
</div>
  </dd>
  <dt id='findFileResults-variable'>
    findFileResults
    =
  </dt>
  <dd>
    <pre><code class='coffeescript'>{}</code></pre>
    
  </dd>
</dl>
      <h2>Instance Method Summary</h2>
      <ul class='summary'>
  <li>
    <span class='signature'>
      <a href='#loadOptions-dynamic'>
        #
(void)
<b>loadOptions</b><span>()</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#encodeURI-dynamic'>
        #
(void)
<b>encodeURI</b><span>(str)</span>
      </a>
    </span>
    <span class='desc'>
      From <a href="https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130">https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130</a> 
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getBeautifiers-dynamic'>
        #
(void)
<b>getBeautifiers</b><span>(language)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getBeautifierForLanguage-dynamic'>
        #
(void)
<b>getBeautifierForLanguage</b><span>(language)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getExtension-dynamic'>
        #
(void)
<b>getExtension</b><span>(filePath)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getLanguages-dynamic'>
        #
(void)
<b>getLanguages</b><span>(grammar, filePath)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getLanguage-dynamic'>
        #
(void)
<b>getLanguage</b><span>(grammar, filePath)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getOptionsForLanguage-dynamic'>
        #
(void)
<b>getOptionsForLanguage</b><span>(allOptions, language)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#transformOptions-dynamic'>
        #
(void)
<b>transformOptions</b><span>(beautifier, languageName, options)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#trackEvent-dynamic'>
        #
(void)
<b>trackEvent</b><span>(payload)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#trackTiming-dynamic'>
        #
(void)
<b>trackTiming</b><span>(payload)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#track-dynamic'>
        #
(void)
<b>track</b><span>(type, payload)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#beautify-dynamic'>
        #
(void)
<b>beautify</b><span>(text, allOptions, grammar, filePath, {onSave, language} = {})</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getUserHome-dynamic'>
        #
(void)
<b>getUserHome</b><span>()</span>
      </a>
    </span>
    <span class='desc'>
      CLI 
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#verifyExists-dynamic'>
        #
(void)
<b>verifyExists</b><span>(fullPath)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#findFile-dynamic'>
        #
(void)
<b>findFile</b><span>(name, dir, upwards = true)</span>
      </a>
    </span>
    <span class='desc'>
      Storage for memoized results from find file Should prevent lots of directory traversal &amp;
lookups when liniting an entire project

    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#findConfig-dynamic'>
        #
(void)
<b>findConfig</b><span>(config, file, upwards = true)</span>
      </a>
    </span>
    <span class='desc'>
      Tries to find a configuration file in either project directory or in the home directory.

    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getConfigOptionsFromSettings-dynamic'>
        #
(void)
<b>getConfigOptionsFromSettings</b><span>(langs)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getConfig-dynamic'>
        #
(void)
<b>getConfig</b><span>(startPath, upwards = true)</span>
      </a>
    </span>
    <span class='desc'>
      Look for .jsbeautifierrc in file and home path, check env variables 
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getOptionsForPath-dynamic'>
        #
(void)
<b>getOptionsForPath</b><span>(editedFilePath, editor)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#isNestedOptions-dynamic'>
        #
(void)
<b>isNestedOptions</b><span>(currOptions)</span>
      </a>
    </span>
    <span class='desc'>
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='#getOptions-dynamic'>
        #
(void)
<b>getOptions</b><span>(selections, allOptions)</span>
      </a>
    </span>
    <span class='bound note title'>Bound</span>
    <span class='desc'>
    </span>
  </li>
</ul>
      <h2>Constructor Details</h2>
      <div class='methods'>
  <div class='method_details'>
    <p class='signature' id='constructor-dynamic'>
      #
(void)
<b>constructor</b><span>()</span>
      <br>
    </p>
    <div class='docstring'>
  <p>Constructor</p>
</div>
<div class='tags'>
</div>
  </div>
</div>
      <h2>Instance Method Details</h2>
      <div class='methods'>
  <div class='method_details'>
    <p class='signature' id='loadOptions-dynamic'>
      #
(void)
<b>loadOptions</b><span>()</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='encodeURI-dynamic'>
      #
(void)
<b>encodeURI</b><span>(str)</span>
      <br>
    </p>
    <div class='docstring'>
  <p>From <a href="https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130">https://github.com/atom/notifications/blob/01779ade79e7196f1603b8c1fa31716aa4a33911/lib/notification-issue.coffee#L130</a></p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getBeautifiers-dynamic'>
      #
(void)
<b>getBeautifiers</b><span>(language)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getBeautifierForLanguage-dynamic'>
      #
(void)
<b>getBeautifierForLanguage</b><span>(language)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getExtension-dynamic'>
      #
(void)
<b>getExtension</b><span>(filePath)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getLanguages-dynamic'>
      #
(void)
<b>getLanguages</b><span>(grammar, filePath)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getLanguage-dynamic'>
      #
(void)
<b>getLanguage</b><span>(grammar, filePath)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getOptionsForLanguage-dynamic'>
      #
(void)
<b>getOptionsForLanguage</b><span>(allOptions, language)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='transformOptions-dynamic'>
      #
(void)
<b>transformOptions</b><span>(beautifier, languageName, options)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='trackEvent-dynamic'>
      #
(void)
<b>trackEvent</b><span>(payload)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='trackTiming-dynamic'>
      #
(void)
<b>trackTiming</b><span>(payload)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='track-dynamic'>
      #
(void)
<b>track</b><span>(type, payload)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='beautify-dynamic'>
      #
(void)
<b>beautify</b><span>(text, allOptions, grammar, filePath, {onSave, language} = {})</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getUserHome-dynamic'>
      #
(void)
<b>getUserHome</b><span>()</span>
      <br>
    </p>
    <div class='docstring'>
  <p>CLI</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='verifyExists-dynamic'>
      #
(void)
<b>verifyExists</b><span>(fullPath)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='findFile-dynamic'>
      #
(void)
<b>findFile</b><span>(name, dir, upwards = true)</span>
      <br>
    </p>
    <div class='docstring'>
  <p>Storage for memoized results from find file
Should prevent lots of directory traversal &amp;
lookups when liniting an entire project</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='findConfig-dynamic'>
      #
(void)
<b>findConfig</b><span>(config, file, upwards = true)</span>
      <br>
    </p>
    <div class='docstring'>
  <p>Tries to find a configuration file in either project directory
or in the home directory. Configuration files are named
&#39;.jsbeautifyrc&#39;.</p><p>@returns {string} a path to the config file</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='name'>config</span>
      <span class='type'>
        (
          <tt>string</tt>
        )
      </span>
      &mdash;
      <span class='desc'>name of the configuration file </span>
    </li>
    <li>
      <span class='name'>file</span>
      <span class='type'>
        (
          <tt>string</tt>
        )
      </span>
      &mdash;
      <span class='desc'>path to the file to be linted </span>
    </li>
    <li>
      <span class='name'>upwards</span>
      <span class='type'>
        (
          <tt>boolean</tt>
        )
      </span>
      &mdash;
      <span class='desc'>should recurse upwards on failure? (default: true) </span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getConfigOptionsFromSettings-dynamic'>
      #
(void)
<b>getConfigOptionsFromSettings</b><span>(langs)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getConfig-dynamic'>
      #
(void)
<b>getConfig</b><span>(startPath, upwards = true)</span>
      <br>
    </p>
    <div class='docstring'>
  <p>Look for .jsbeautifierrc in file and home path, check env variables</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getOptionsForPath-dynamic'>
      #
(void)
<b>getOptionsForPath</b><span>(editedFilePath, editor)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='isNestedOptions-dynamic'>
      #
(void)
<b>isNestedOptions</b><span>(currOptions)</span>
      <br>
    </p>
    
  </div>
  <div class='method_details'>
    <p class='signature' id='getOptions-dynamic'>
      #
(void)
<b>getOptions</b><span>(selections, allOptions)</span>
      <span class='bound note'>Bound</span>
      <br>
    </p>
    
  </div>
</div>
    </div>
    <div id='footer'>
  By
  <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
    Codo
  </a>
  2.1.2
  &#10034;
  Press H to see the keyboard shortcuts
  &#10034;
  <a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
  &#10034;
  <a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
  <input type='text'>
  <ol></ol>
</div>
<div id='help'>
  <p>
    Quickly fuzzy find classes, mixins, methods, file:
  </p>
  <ul>
    <li>
      <span>T</span>
      Open fuzzy finder dialog
    </li>
  </ul>
  <p>
    Control the navigation frame:
  </p>
  <ul>
    <li>
      <span>L</span>
      Toggle list view
    </li>
    <li>
      <span>C</span>
      Show class list
    </li>
    <li>
      <span>I</span>
      Show mixin list
    </li>
    <li>
      <span>F</span>
      Show file list
    </li>
    <li>
      <span>M</span>
      Show method list
    </li>
    <li>
      <span>E</span>
      Show extras list
    </li>
  </ul>
  <p>
    You can focus and blur the search input:
  </p>
  <ul>
    <li>
      <span>S</span>
      Focus search input
    </li>
    <li>
      <span>Esc</span>
      Blur search input
    </li>
  </ul>
</div>
  </body>
</html>